import React from 'react'
import ThemeContext from './context/theme-context'

export default function HomeBanner() {
  return (
    <div>
      HomeBanner
      {/* 函数中使用 context */}
      <ThemeContext.Consumer>
        {
          value=>{
            return <p style={{color: value.color, fontSize: value.size}}>HomeBanner</p>
          }
        }
      </ThemeContext.Consumer>
    </div>
  )
}
